package com.liu.efk.controller;


import com.liu.efk.domain.Duser;
import com.liu.efk.domain.ResultVo;
import com.liu.efk.service.IDuserService;
import com.liu.efk.vo.UserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/user")
@CrossOrigin
@Api(tags = "账号管理接口")
public class UserController {

    @Value("${server.version}")
    private String version;
    @Autowired
    RedisTemplate redisTemplate;


    @Autowired
    IDuserService duserService;

    @GetMapping("/list")
    @ApiOperation("查询所有的用户账号分页")
    public ResultVo userList(Integer num ,Integer rows){

      return  ResultVo.success("返回用户列表++"+version, duserService.getUserVOList(num,rows));
    }


    @GetMapping("/listno")
    @ApiOperation("查询所有的用户账号分页")
    public ResultVo userList(){

        return  ResultVo.success("返回用户列表++");
    }






}
